<{if !$inAdmin}>

<nav id="primary_navigation" class="container_<{$grid_columns }> clearfix">
	<div role="navigation" class="grid_<{$grid_columns }>">
		<ul class="sf-menu">
			<li class="first <{if $ishome}>active<{/if}>">
			<a href="<{$icms_url}>"><{$smarty.const.THEME_HOME}></a>
			</li>
			<li class=""><a href="#" title="">Module Menu</a>
			<ul>
				<div class="col">
				<!-- Block- module menu -->
				<{php }>
					$block_id = 5; 
					$theme = $GLOBALS['icmsConfig']['theme_set']; 
					include ICMS_THEME_PATH.'/'.$theme.'/html/block_engine.php';
				<{/php}>
				<{$block.content}>
				</div>
			</ul>
			</li>
			<li class=""><a href="#" title="">Search</a>
				<ul class="dropdown_column">
					<div class="col">
					<!-- Block- search -->
					<{php }>
						$block_id = 3; 
						$theme = $GLOBALS['icmsConfig']['theme_set']; 
						include ICMS_THEME_PATH.'/'.$theme.'/html/block_engine.php';
					<{/php}>
					<{$block.content}>
					</div>
				</ul>
			</li>
			<li class=""><a href="#" title=""><{if !$icms_isuser}>Login<{else}>User Menu<{/if}></a>
				<ul class="dropdown_column">
					<div class="col">
					<!-- Block- login -->
					<{php }>
						$block_id = 2; 
						$theme = $GLOBALS['icmsConfig']['theme_set']; 
						include ICMS_THEME_PATH.'/'.$theme.'/html/block_engine.php';
					<{/php}>
					<{$block.content}>
					<!-- Block- usermenu -->
					<{php }>
						$block_id = 1; 
						$theme = $GLOBALS['icmsConfig']['theme_set']; 
						include ICMS_THEME_PATH.'/'.$theme.'/html/block_engine.php';
					<{/php}>
					<{if $icms_isadmin}>
						<a href="<{$icms_url}>/admin.php">Admin</a>
					<{/if}>
					<{$block.content}>
					</div>
				</ul>
			</li>
			<li class=""><a href="#">About</a>
		</ul>
	</div>
</nav>

<{else}>
<nav id="primary_navigation" class="container_<{$grid_columns }> clearfix">
<div id="navbarCP" role="navigation" class="grid_<{$grid_columns }>">
  <ul id="nav" class="sf-menu">
    <{foreach item=item from=$navitems}>
      <{if ($systemadm || $item.id != 'opsystem') && ($item.id != 'news' || $show_impresscms_menu)}>
        <{if $modulesadm || $item.id != 'modules'}>
	      <li><a href="<{$item.link}>"><{$item.text}></a>
	        <ul>
		      <{foreach item=sub from=$item.menu}>
                <{if $item.id == 'cphome'}>
		          <li><a href="<{if $sub.absolute==1}><{$sub.link}><{else}><{$icms_url}>/modules/<{$sub.dir}>/<{$sub.link}><{/if}>" style="background-position:left center; background-repeat:no-repeat; background-image: url(<{if $sub.small!=''}><{$sub.small}><{else}><{$icms_url}>/modules/system/images/imagesarrow1.gif<{/if}>);"><{$sub.title}></a></li>
                <{elseif $item.id == 'opsystem'}>
                  <li><a href="<{if $sub.absolute==1}><{$sub.link}><{else}><{$icms_url}>/modules/<{$sub.dir}>/<{$sub.link}><{/if}>"><{$sub.title}></a>
                    <{if $sub.hassubs}>
                      <ul style="margin-left: 20px;">
                        <{foreach item=subitem from=$sub.subs}>
                          <li><a href="<{$subitem.link}>" style="background-position:left center; background-repeat:no-repeat; background-image: url(<{if $subitem.small!=''}><{$icms_url}>/modules/system/<{$subitem.small}><{else}><{$icms_url}>/modules/system/images/imagesarrow1.gif<{/if}>);"><{$subitem.title}></a>
                            <{if $subitem.hassubs}>
                      <ul style="margin-left: 20px;">
                                <{foreach item=subsubitem from=$subitem.subs}>
                                  <li><a href="<{$subsubitem.link}>"><{$subsubitem.title}></a></li>
                                <{/foreach}>
                              </ul>
                            <{/if}>
                          </li>
                        <{/foreach}>
                      </ul>
                    <{/if}>
                  </li>
                <{elseif $item.id == 'modules'}>
		          <li><a href="<{if $sub.absolute==1}><{$sub.link}><{else}><{$icms_url}>/modules/<{$sub.dir}>/<{$sub.link}><{/if}>" style="background-position:left center; background-repeat:no-repeat; background-image: url(<{if $sub.small!=''}><{$sub.small}><{else}><{$icms_url}>/modules/system/images/modulesitem.png<{/if}>);"><{$sub.title}></a>
    		      <{if $sub.hassubs}>
                      <ul style="margin-left: 20px;">
		              <{foreach item=subitem from=$sub.subs}>
		                <li><a href="<{$subitem.link}>"><{$subitem.title}></a></li>
		              <{/foreach}>
		            </ul>
		          <{/if}>
		          </li>
                <{elseif $item.id == 'news' && $show_impresscms_menu}>
    		      <li><a rel="external" href="<{if $sub.absolute==1}><{$sub.link}><{else}><{$icms_url}>/modules/<{$sub.dir}>/<{$sub.link}><{/if}>" style="background-position:left center; background-repeat:no-repeat; background-image: url(<{if $sub.small!=''}><{$sub.small}><{/if}>);"><{$sub.title}></a></li>
                <{/if}>
		      <{/foreach}>
		    </ul>
	      </li>
	    <{/if}>
	  <{/if}>
    <{/foreach}>
  </ul>
<{if $ml_is_enabled}>
	<span id="nav-change-language">[mlimg]</span>
  <{/if}>
</div>
<{ if $modname != '' }>
  <div role="navigation" class="grid_<{$grid_columns }>" id="navOptionsCP">
	<{foreach item=op from=$mod_options}>
	  <a href="<{$op.link}>" title="<{$op.title}>">
        <{if $op.title == $lang_prefs && $moddir!='system'}>
          <img src="<{$icms_url}>/modules/system/images/prefs.png" alt="<{$lang_preferences}>" />
        <{else}>
          <img src="<{if $op.icon==''}><{$icms_url}>/images/icon_options.png<{else}><{$modpath}>/<{$op.icon}><{/if}>" alt="<{$op.title}>" />
        <{/if}>
      </a>
	<{/foreach}>
  </div>
<{/if}>
</nav>
<{/if}>